<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<title>与 卿婚纱管理系统</title>
		<link rel="stylesheet" href="css/login.css">
		<script type="text/javascript" src="js/jquery.min.js"></script>
		<script type="text/javascript" src="js/index.js"></script>
		<script src="./lib/layui/layui.js" charset="utf-8"></script>
	</head>

	<body class="login-bg">
		<canvas id="fullstarbg">你的浏览器不支持canvas标签</canvas>
		<div class="login">
			<div class="message layui-bg-red">与♡ 卿婚纱公司系统登录</div>
			<div id="darkbannerwrap"></div>
			<form  class="layui-form">
				<input name="name" placeholder="用户名" type="text" lay-verify="required" class="layui-input">
				<hr class="hr15">
				<input name="password" lay-verify="required" placeholder="密码" type="password" class="layui-input">
				<hr class="hr15">
				<input value="登录" lay-submit lay-filter="login" style="width:100%;" type="submit" class="layui-bg-orange"  >
				<hr class="hr20">
			</form>
		</div>
		<!-- script引入 -->
		<script type="text/javascript" src="/wK2un11/houtai/lib/layui/layui.js"></script>
		
		<script>
		layui.use(['form'], function() {
			$ = layui.jquery;
			var form = layui.form, layer = layui.layer;
			//监听提交
			form.on('submit(login)',function(data) {
				var url = '/wK2un11/HouIndexServlet?method=login';
				var d = data.field;
				$.post(url, d, 
					function(data) {
					if (data.success==true) {
						window.location.href = "index.jsp";
					} else {
						layer.msg(data.data);
					}
				}, "json");
				return false;
			});
		});
	</script>

		<!-- 底部结束 -->

	</body>

</html>